const router = require('koa-router')()
const good = require('./good')
const news = require('./new')
const superlink = require('./superlink')
const type = require('./type')
const user = require('./user')

const dbs = require('../../mysql/index').isconnect()

router.use('/good', good)
router.use('/new', news)
router.use('/superlink', superlink)
router.use('/goodtype', type)
router.use('/user', user)

router.get('/about', async ctx => {
  ctx.body = await dbs.find('*', 'contactuser')
})

module.exports = router.routes()
